'''
Minimal setup.py example, run with:
% python setup.py py2app
'''

from setuptools import setup

NAME = "Drawing Board"
SCRIPT = "DrawingBoard.py"
VERSION = "0.3.2"
ICON = "DrawingBoard.icns"
ID = "drawing_board"
COPYRIGHT = "Copyright 2005, 2006 Dethe Elza"
DATA_FILES = ['English.lproj']
DOCTYPE_NAME = "Drawing Board File"
DOCTYPE_EXTS = ["draw"]
DOCTYPE_ROLE = "Editor"
DOCTYPE_CLASS = "DBDocument"
DOCTYPE_ICON = "DBDocument.icns"

plist = dict(
    CFBundleIconFile            = ICON,
    CFBundleName     = NAME,
    CFBundleShortVersionString = ' '.join([NAME, VERSION]),
    CFBundleGetInfoString = NAME,
    CFBundleExecutable = NAME,
    CFBundleIdentifier = 'org.livingcode.applications.%s' % ID,
    NSHumanReadableCopyright = COPYRIGHT,
    CFBundleDocumentTypes = [
        dict(
            CFBundleTypeExtensions=DOCTYPE_EXTS,
            CFBundleTypeIconFile=DOCTYPE_ICON,
            CFBundleTypeName=DOCTYPE_NAME,
            CFBundleTypeRole=DOCTYPE_ROLE,
            NSDocumentClass=DOCTYPE_CLASS,
        ),
    ]
)

py2app_opt = dict(plist=plist,iconfile=ICON)

setup(app=[SCRIPT],
    setup_requires=['py2app'],
    data_files=DATA_FILES,
    options=dict(
        py2app=dict(
            plist=plist,
            iconfile=ICON,
        ),
    ),
)


